import Taro, { Component } from "@tarojs/taro";
import { View, Image } from "@tarojs/components";
import {getRuntime} from '../../utils/common'
import './index.less'
import './welfare_success.less'
import success_icon from '../../assets/img/icon_72.png'

// 工程金融中心-首页
class Success extends Component{
  constructor(props){
    super(props)
  }

  componentWillMount(): void {
    Taro.setNavigationBarTitle({ title:'申请已提交成功' })
  }

  handelRouter(url: string = '/pages/index/index'): void {
    getRuntime().navigateTo(url)
  }

  render() {
    return(
    <View className='welfare-success'>
      <View className='apply-success'>
        <View className='content'>
          <Image className='success-icon' src={success_icon} />
          <View className='title'>您的申请已提交成功</View>
          <View className='desc'>请等待工资人员审核，审核成功后以投票决定~</View>
        </View>
        <View className='btn-group' onClick={this.handelRouter.bind(this,'/pages/public_welfare/index')}>
          <View className='btn btn-line-submit'>完成</View>
        </View>
      </View>
    </View>
    )
  }
}

export default Success
